//
//  QRCodeViewController.h
//  ShaoPingWuLiu
//
//  Created by WeiPan on 15/11/25.
//  Copyright (c) 2015年 HuaYiSoftware. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void(^resultBlock)(NSString* string);

@interface QRCodeViewController : UIViewController

//@property (nonatomic, copy) void(^resultBlock)(NSString *result);
@property (nonatomic, copy) resultBlock resultBlock;

/**
 *  识别图中二维码
 *
 *  @param image 需要识别的图片
 *
 *  @return 识别后返回一个字符串
 */
+ (void)recognizeWithImage:(UIImage *)image withBlock:(resultBlock)block;
/**
 *  是否开启摄像头权限
 *
 *  @return 权限
 */
+ (BOOL)isAllowCamera;
@end
